package com.test;

public class Adapter extends Supplier implements Target {
    @Override
    public String supply() {
        return super.doSupply();//使用供应者的进行实现目标方法
    }

    public static void main(String[] args) {
        Adapter adapter = new Adapter();
        test(adapter);
    }
    public static void test(Target target) {
        System.out.println("成功获得："+target.supply());
    }
}
